package com.per.mybootall.controller;

import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.messaging.handler.annotation.SendTo;
import org.springframework.stereotype.Controller;

@Controller
public class WsController {

//    /*@MessageMapping("/welcome")相当于@requestMapping注解*/
//    @MessageMapping("/welcome")
//    /*@SendTo注解表示当服务器有消息需要推送的时候，会对订阅了@SendTo中路径的浏览器发送消息。*/
//    @SendTo("/topic/getResponse")
//    public ResponseMessage say(RequestMessage message) {
//        System.out.println(message.getName());
//        return new ResponseMessage("welcome," + message.getName() + " !");
//    }

}
